import * as mecharts from 'echarts';
export function line(data,data1,data2) {
  return {
    xAxis: {
      type: 'category',
      boundaryGap: false,
      data: data
    },
    grid: {
      right: '40',
      bottom: '40',
      left:'40',
    },
    yAxis: [
      {
        type: 'value',
        name: '单位：亿元',
        min: 0,
        max: 250,
        position: 'left',
        axisLabel: {
          formatter: '{value}'
        },
        splitLine:{show: false},
      },{
        type: 'value',
        name: '单位：%',
        min: 0,
        max: 6,
        position: 'right',
        offset: 0,
        axisLabel: {
          formatter: '{value} '
        },
        splitLine:{show: false},
      }
    ],
    series: [{
      data: data1,
      type: 'line',
      itemStyle: {
        normal:{
          color: '#2C82FD',
          areaStyle: {
            color: new mecharts.graphic.LinearGradient(0, 0, 0, 1, [{
              offset: 0,
              color: '#9FC1F0'
            }, {
              offset: 1,
              color: '#fff'
            }])
          },
        }
      },

    },{
      data: data2,
      // type: '',
      areaStyle: {}
    }]
  }
}
